home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / MT2ToolKit 1.0b1 / Trivial / MakeMenu.Trivial < prev    next >
Text File  |  1995-09-23  |  540b  |  25 lines

  1.  
  2. {%% Generation option: -m}
  3.  
  4. PROCEDURE DoMakeMenus;
  5.     var
  6.         menuBar: Handle;
  7.     
  8.     BEGIN
  9.       menuBar:=GetNewMBar(MBARID); {read menus and menu bar}
  10.     
  11.       IF menuBar<>NIL
  12.         THEN
  13.           BEGIN
  14.             SetMenuBar(menuBar); {insert menus into the current menu list}
  15.             DisposHandle(menuBar);
  16.             AddResMenu(GetMHandle({%%*}),'DRVR'); {add desktop items in Apple Menu
  17.                                                    Items folder to Apple menu}
  18.                                                 
  19.             {%% >> adjust items and enabled state of menus <<}
  20.             
  21.             DrawMenuBar; {draw the menu bar}
  22.     
  23.           END;
  24.     END; {DoMakeMenus}
  25.